#{extends 'main.html' /}
#{set title: userToDisplay.lastNameUser+" "+userToDisplay.firstNameUser/}
#{set 'moreStyles'}
        #{stylesheet 'dashboard.css' /}
#{/set}

<section>
	<div id="container_data">
		<div class="row">
			<div class="span10 offset1">
				<div class="row">
					<div class="span2">
						<img id="avatar" src="@{Interventions.image(userToDisplay.id)}" class="img-polaroid">
					</div>				
					<div class="span5">
						<div class="row"><h2>${userToDisplay.lastNameUser} ${userToDisplay.firstNameUser}</h2></div>
						<div class="row">
							<ul>
								<li><small>${userToDisplay.emailUser}</small></li>
								<li>
									<small>
									#{if userToDisplay.dtype == "Enseignant"}
										Enseignant &agrave; l'IUT
									#{/if}
									#{else}
										Etudie en ${userToDisplay.formationStudent.libelleFormation}
									#{/else}
									</small>
								</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
		<div class="" id="info">
	    <ul>
	    	<li>
	    		<span><img src="@{'/public/images/appbar.clock.png'}"/></span>
	    		<large>
	    			#{if userToDisplay.dtype == "Enseignant"}
	    				${userToDisplay.listInterventionEnseignant.size()}
	    			#{/if}
	    			#{else}
	    				${interventionsOfStudent.size()}
	    			#{/else}
	    		</large>
	    		<small>Cours</small>
	    	</li>
	        <li class="inextremist">
	        	<span>
	        		<img src="@{'/public/images/appbar.star.png'}"/>
	        	</span>
	        	<large>
	        	%{ nbEval = 0}%
	        	#{if userToDisplay.dtype == "Enseignant"}
		        	#{list userToDisplay.listInterventionEnseignant, as:'intervention'}
		        		#{if intervention.listEvaluation2Intervention != null}
		        			#{list intervention.listEvaluation2Intervention, as:'evaluation'}
		        				%{ nbEval += 1; }%
		        			#{/list}
		        		#{/if}
		        	#{/list}
		        #{/if}
		        #{else}
		        	%{ nbEval = userToDisplay.listEvaluation2Student.size() }%		        	
		        #{/else}
	        	${nbEval}	        	
	        	</large>
	        	<small>Evaluations</small>
	        </li>
	        <li class="inextremist">
	        	<span><img src="@{'/public/images/appbar.chat.png'}"/></span>
	        	<large>
	        	%{ nbCom = 0}%
	        	#{if userToDisplay.dtype == "Enseignant"}
		        	#{list userToDisplay.listInterventionEnseignant, as:'intervention'}
		        		#{if intervention.listEvaluation2Intervention != null}
				        	#{list intervention.listEvaluation2Intervention, as:'evaluation'}
				        		#{if evaluation.commentaire != ""}
				        			%{ nbCom += 1; }%
				        		#{/if}
				        	#{/list}
				        #{/if}
				    #{/list} 
				#{/if}
				#{else}
		        	#{list userToDisplay.listEvaluation2Student, as:'evaluation'}
		        		#{if evaluation.commentaire != null}
				        	%{ nbCom += 1; }%
				        #{/if}
				    #{/list} 				
				#{/else}
	        	${nbCom}
	        	</large>
	        	<small>Commentaires</small></li>
	        <li class="inextremist">
	        	<span><img src="@{'/public/images/appbar.graph.line.up.png'}"/></span>
	        	<large>13.25</large>
	        	<small>Moyenne G&eacute;n&eacute;rale</small>
	        </li>
	    </ul>
	</div>
</section>